<?php
require "conn.php";
$MedicineName=$_POST['MedicineName'];
echo $MedicineName;
$UserId=$_POST['UserId'];
echo $UserId;
$AddTime=$_POST['AddTime'];
echo $AddTime;
$RealName=$_POST['RealName'];
echo $RealName;
$Mobile=$_POST['Mobile'];
echo $Mobile;
$Address=$_POST['Address'];
echo $Address;
$State=$_POST['State'];
echo $State;
$SendType=$_POST['SendType'];
echo $SendType;
$Remark=$_POST['Remark'];
echo $Remark;
$insert="insert into orderinfo value (null,'$MedicineName','$UserId','$AddTime','$RealName','$Mobile','$Address',$State,null,$SendType,'$Remark')";
$query=mysqli_query($conn,$insert);
echo mysqli_error($conn);
if ($query){
    echo "<script>alert('订购成功！');window.location.href='index.php';</script>";
}else{
    echo "<script>alert('订购失败！');window.location.href='index.php';</script>";
}